package com.lanou.dao;

import com.lanou.domain.CrmDepartment;
import org.springframework.orm.hibernate5.support.HibernateDaoSupport;

import java.util.List;

/**
 * Created by lanouhn on 17/9/28.
 */
public class DepDaoImpl extends HibernateDaoSupport implements DepDao{
    @Override
    public List<CrmDepartment> findAll() {
        System.out.println("dao层..............");
        List<CrmDepartment> allCrmDep = (List<CrmDepartment>) this.getHibernateTemplate().find("from CrmDepartment");
        System.out.println(allCrmDep);
        return allCrmDep;
    }


}
